package com.gjy.leetcode;

import java.util.Arrays;

/**
 * 2185. 统计包含给定前缀的字符串
 *
 * @author 宫静雨
 * @version 1.0
 * @since 2023-01-08 21:47:23
 */
public class A2185 {

    public int prefixCount(String[] words, String pref) {
        return (int) Arrays.stream(words)
                .filter(word -> word.startsWith(pref))
                .count();
    }
}
